<!--
 * @Descripttion: 
 * @version: 
 * @Author: seehar
 * @Date: 2021-10-03 18:13:43
 * @LastEditors: seehar
 * @LastEditTime: 2021-10-06 20:46:14
-->
<template>
  <div style="padding: 1rem 15rem">
    <h1 style="text-align: center;">{{ data.event_name }}</h1>

    <div style="padding: 1rem 0">
      <el-descriptions border :column="1">
        <el-descriptions-item label="时间">{{
          data.post_time
        }}</el-descriptions-item>
        <el-descriptions-item label="发生地点">{{
          data.address
        }}</el-descriptions-item>
        <el-descriptions-item label="主要参与人">{{
          data.participant
        }}</el-descriptions-item>
      </el-descriptions>
    </div>

    <el-card>
      <p>{{ data.desc }}</p>
      <div style="text-align: center;">
        <el-image
          v-if="data.img"
          :src="`${baseURL}/static/${data.img}`"
          fit="scale-down"
          style="border-radius: 11px;"
        />
      </div>
      <p>{{ data.mean }}</p>
    </el-card>
  </div>
</template>

<script>
import { getPartyHistoryDetail } from '@/network/api'
import { baseURL } from '@/network/request'

export default {
  created () {
    if (this.partyHistoryId) {
      getPartyHistoryDetail(this.partyHistoryId).then(res => {
        this.data = res
      })
    }
  },
  data () {
    return {
      partyHistoryId: this.$route.params.id,
      data: {},
      baseURL: baseURL,
    }
  }
}
</script>

<style lang="scss" scoped>
/deep/ .el-descriptions :not(.is-bordered) .el-descriptions-item__cell {
  border-radius: 1rem;
}

/deep/ .el-descriptions__body {
  border-radius: 1rem;
}
</style>